<?php 
$sql =	"SELECT
			  c.page_id,
			  d.title,
			  d.description,
			  d.meta_key,
			  d.meta_description	
		  FROM
			  pages AS c,
			  page_description AS d,
			  sef_url AS s
		  WHERE
		  
			  c.page_id = d.page_id
			  AND
			  d.lang_id = '".$_SESSION['lang_id']."'
			  
			  AND
				c.page_id = s.query
				AND
				s.lang_id = '".$_SESSION['lang_id']."'
				AND s.tamplate = 'page'
			 
			  AND
				s.sef_url = 'home' 
		  ";
$result = query($sql);
$row = mysql_fetch_object($result);


head(sth($row->title),sth($row->meta_description),sth($row->meta_key));
?>
 <section id="content" class="cf">
        <div id="i-do" class="gr-2-col left">
            <img src="<?=HTML_BASE?>images/i-do.jpg">
        </div>
        
        <div class="gr-4-col right">
            <ul id="homeslider">
            <li>
                <a href="<?=HTML_BASE.$_SESSION['lang']?>">
                    <img src="<?=HTML_BASE?>images/advertising.jpg" alt=""/>
                </a>
            </li>
            
        <?php 
				$sql_c = "SELECT
                     c.cover,
                     d.title,
					(SELECT sef_url FROM sef_url WHERE 
					 lang_id = '".$_SESSION['lang_id']."' 
					 AND query =  c.project_id 
					 AND tamplate = 'project' ) AS sef_url
                    
                FROM
                    projects AS c,
                    project_description AS d
                WHERE
                    
					c.project_id = d.project_id
                    
                    AND
                    
                    d.lang_id = '".$_SESSION['lang_id']."'
                    
                    AND
                    
					c.published
					
					AND
                    
					c.top
                    
                    ORDER BY c.order_number DESC
                    
                  ";
				  
				
			$result = query($sql_c);
			
			while ($rowp = mysql_fetch_object($result)) {
				
				
				
				
		?>
            <li>
                <a href="<?=HTML_BASE.$_SESSION['lang']?>/<?=$rowp->sef_url?>" class="<?=$rowp->class?>">
                    <img src="<?=HTML_BASE?>project_images/big/<?=$rowp->cover?>" alt="<?=$rowp->title?>" title="<?=$rowp->title?>"/>
                </a>
            </li>
        
        <?php }?>
        	
            
            </ul>
        </div>
              
        <div class="gr-2-col left">
            <?php /*?>
            <div class="tab">
                <h1><?=stripslashes($row->title)?></h1>
                <?=stripslashes($row->description)?>
            </div>
			<?php */?>
        </div>
        
                
    </section>
    
    
<?php
foot('home');
?>